#!/bin/sh
# $NetBSD: hal-system-power-reboot-netbsd,v 1.1 2008/11/27 03:32:19 jmcneill Exp $

unsupported() {
	echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
	echo "No reboot command found" >&2
	exit 1
}

#Try for common tools
if [ -x "/sbin/shutdown" ] ; then
	/sbin/shutdown -r now
	exit $?
elif [ -x "/usr/sbin/shutdown" ] ; then
	/usr/sbin/shutdown -r now
	exit $?
else
	unsupported
fi
